package com.ad.advertiser.service.impl;

import com.ad.advertiser.dao.IAdUserDAO;
import com.ad.advertiser.service.IAdUserService;
import com.ad.common.entity.User;

public class AdUserServiceImpl implements IAdUserService{
	private IAdUserDAO adUserDAO ;

	@Override
	public void edit(User user) {
		
	}

	@Override
	public User getUserByProperty(Integer id) {
		return null;
	}

	@Override
	public boolean isExist(String username) {
		return this.adUserDAO.findByUsername(username)==null?false:true;
	}

	@Override
	public User login(String username, String password, int userType) {
		return adUserDAO.query(username, password, userType);
	}

	@Override
	public boolean register(User user) {
		return this.adUserDAO.save(user);
	}
	public IAdUserDAO getAdUserDAO() {
		return adUserDAO;
	}

	public void setAdUserDAO(IAdUserDAO adUserDAO) {
		this.adUserDAO = adUserDAO;
	}

}
